package com.zhuyuan.system.service.impl;

import com.zhuyuan.database.base.BaseServiceImpl;
import com.zhuyuan.system.api.domain.SysRole;
import com.zhuyuan.system.mapper.SysRoleMapper;
import com.zhuyuan.system.service.ISysRoleService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: 张琳凯
 * @Description: TODO
 * @DateTime: 2025/2/19 16:19
 **/
@Service
@RequiredArgsConstructor
public class SysRoleServiceImpl extends BaseServiceImpl<SysRole, SysRoleMapper>  implements ISysRoleService {
    private final SysRoleMapper sysRoleMapper;

    @Override
    public boolean hasSuperAdminByUid(Long id) {
        return sysRoleMapper.hasSuperAdminByUid(id);
    }

    @Override
    public List<String> getRoleIdsByUid(Long id) {

        return sysRoleMapper.queryRoleIdsByUid(id);
    }

    @Override
    public List<SysRole> getRoles(SysRole sysRole) {
        return sysRoleMapper.queryRoles(sysRole);
    }

}
